package com.cxm.weilai.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Description 读取interface.param.properties里的配置参数
 * @author zjs
 * @time 2015-12-24 下午 8:00:20
 * @version 1.0
 */
public class ReadConfigParam {

    private static String reqURL;
    private static String reqStr;
    private static Integer setHour;
    private static Integer setMinute;
    private static Integer setSecond;
    private static Integer setTime;
    private static Integer c_schedule_hour;

    private static String getAllUserJson;
    private static String getNewUserJson;
    private static String getLeaveUserJson;
    private static String getAllPersonJson;

    private static String conURL;
    private static String saveOrUpdate;
    private static String delete;

    private static String proAcount;
    private static String delProAccount;

    static {
        InputStream inputStream = ReadConfigParam.class.getResourceAsStream("/conf/interface.param.properties");
        Properties prop = new Properties();
        try {
            prop.load(inputStream);
            inputStream.close();
            reqURL = prop.getProperty("reqURL").trim();
            reqStr = prop.getProperty("reqStr").trim();
            setHour = Integer.valueOf(prop.getProperty("setHour").trim());
            setMinute = Integer.valueOf(prop.getProperty("setMinute").trim());
            setSecond = Integer.valueOf(prop.getProperty("setSecond").trim());
            setTime = Integer.valueOf(prop.getProperty("setTime").trim());
            c_schedule_hour = Integer.valueOf(prop.getProperty("c_schedule_hour").trim());

            conURL = prop.getProperty("conURL").trim();

        } catch (IOException e) {
        }
    }

    public ReadConfigParam() {}

    public static String getReqURL() {
        return reqURL;
    }

    public static String getReqStr() {
        return reqStr;
    }

    public static Integer getSetHour() {
        return setHour;
    }

    public static Integer getSetMinute() {
        return setMinute;
    }

    public static Integer getSetSecond() {
        return setSecond;
    }

    public static Integer getSetTime() {
        return setTime;
    }

    public static String getGetAllUserJson() {
        return getAllUserJson;
    }

    public static String getGetNewUserJson() {
        return getNewUserJson;
    }

    public static String getGetLeaveUserJson() {
        return getLeaveUserJson;
    }

    public static String getConURL() {
        return conURL;
    }

    public static String getSaveOrUpdate() {
        return saveOrUpdate;
    }

    public static String getDelete() {
        return delete;
    }

    public static Integer getC_schedule_hour() {
        return c_schedule_hour;
    }

    public static String getProAcount() {
        return proAcount;
    }

    public static String getGetAllPersonJson() {
        return getAllPersonJson;
    }

    public static String getDelProAccount() {
        return delProAccount;
    }

}
